home *** CD-ROM | disk | FTP | other *** search
/ Practical Web Pages 2004 September / PracticalWebPages-WPG13-09-2004-Coverdisc.iso / pc / Software / Toolkit / Sothink SWF Quicker 1.5 / data1.cab / Public_Files / Effects / ActionScript / Scale / FadingShadow.sqe < prev    next >
Encoding:
Text File  |  2004-06-14  |  2.3 KB  |  89 lines

  1. ========== Description Part Begin ==========
  2. name = "Fading Shadow";
  3. description = "Every character is moving with its shadow followed. When a character moves to a specified position, its shadow will knock the character and fade out finally.";
  4. version = "1.00";
  5. bin = "FadingShadow.bin";
  6. ========== Description Part End ==========
  7.  
  8. ========== Parameter Part Begin ==========
  9. $nCharacterCount(EDIT,INT,1,1 10000,"Total Characters ","The total characters using the special effect. The value is defined by the selected characters in the movie, but can not be changed in the property box.");
  10. $nFrameCount(EDIT,INT,3,3 3,"Total Frames","It indicates the total frames of actions. The total frames of the effect is probably more than it.");
  11. $nSpeed(EDIT,INT,5,1 10000,"Speed","The speed of character moving.");
  12. $nGhostChangeSpeed(EDIT,INT,5,1 10000,"Shadow Speed","The speed of shadow changing.");
  13. ========== Parameter Part End ==========
  14.  
  15. ========== Function Part Begin ==========
  16. nFrameCount = 10;
  17. nCharacterCount = 4;
  18.  
  19. nSpeed = 10;
  20. nGhostChangeSpeed = 1;
  21.  
  22. nSize = 0;
  23.     for (i = 1; i <= nCharacterCount; i++)
  24.     {
  25.         this["c" + i]._yscale = 0;
  26.         this["c" + i]._xscale = 0;
  27.         this["c" + i]._alpha = 0;
  28.     }
  29.  
  30. function fun()
  31. {
  32.     
  33.     if(nSize > 100)
  34.     {
  35.         CopyObject();
  36.         return ;
  37.         
  38.     }
  39.     nSize += nSpeed;
  40.     for(i = nCharacterCount + 1;i <= nCharacterCount * 2;i++)
  41.         {
  42.             this["c" + (i - nCharacterCount)].duplicateMovieClip("c"+i, i);
  43.         }
  44.     for (i = 1; i <= nCharacterCount; i++)
  45.     {
  46.         this["c" + i]._yscale = nSize;
  47.         this["c" + i]._xscale = nSize;
  48.         this["c" + i]._y = nSize;
  49.         
  50.         this["c" + i]._alpha = nSize;
  51.     }
  52.     
  53.     
  54. }
  55.  
  56. function again()
  57. {
  58.     gotoAndPlay(2);
  59. }
  60.  
  61.  
  62. function CopyObject()
  63. {
  64.     
  65.         for(i = nCharacterCount + 1;i <= nCharacterCount * 2;i++)
  66.         {
  67.             this["c" + (i - nCharacterCount)].duplicateMovieClip("c"+i, i);
  68.         }
  69.         for (i = nCharacterCount + 1; i <= nCharacterCount * 2; i++)
  70.         {
  71.             this["c" + i]._yscale +=  nGhostChangeSpeed;
  72.             this["c" + i]._xscale +=  nGhostChangeSpeed;
  73.             
  74.             this["c" + i]._alpha -=  nGhostChangeSpeed;
  75.         }
  76.         nGhostChangeSpeed += nSpeed;
  77.         
  78.  
  79.         if(nGhostChangeSpeed  > 100)
  80.             gotoAndPlay(1);
  81. }
  82.  
  83. ========== Function Part End ==========
  84.  
  85. ========== Frame Part Begin ==========
  86. $frame(fun,1,-1,"fun");
  87. $frame(fun,2,-1,"fun");
  88. $frame(again,3,-1,"again");
  89. ========== Frame Part End ==========